 <?php 
session_start();

if (empty($_SESSION["id_usu"])) 
  {
    ?>
		<script type="text/javascript">window.location="index.php"; </script> 
<?php  
  }
 
include("conexion.php");

$sql =mysql_query("SELECT * FROM tipokar",$conn) or die(mysql_error());
$not =mysql_query("SELECT * FROM notarios",$conn) or die(mysql_error());
$doc =mysql_query("SELECT * FROM tipodocumento",$conn) or die(mysql_error());

$sqlmon=mysql_query("SELECT * FROM monedas",$conn) or die(mysql_error()); 
$sqltpago=mysql_query("SELECT * FROM mediospago",$conn) or die(mysql_error()); 
$sqlbancos=mysql_query("SELECT * FROM bancos",$conn) or die(mysql_error()); 
$sqlsedess=mysql_query("SELECT * FROM sedesregistrales",$conn) or die(mysql_error()); 
$sqloporpago=mysql_query("SELECT * FROM oporpago",$conn) or die(mysql_error());
$sqltbienn=mysql_query("SELECT * FROM tipobien",$conn) or die(mysql_error());


$sqlsede =mysql_query("SELECT * FROM sedesregistrales",$conn) or die(mysql_error());
$sqlsec =mysql_query("SELECT * FROM seccionesregistrales",$conn) or die(mysql_error());
$sqltra =mysql_query("SELECT * FROM tipotramogestion",$conn) or die(mysql_error());
$sqlestra=mysql_query("SELECT * FROM estadoregistral",$conn) or die(mysql_error());
$coduser=$_SESSION["id_usu"];
$sqluser=mysql_query("SELECT * FROM usuarios where idusuario='$coduser'",$conn) or die(mysql_error());
$rowwuser=mysql_fetch_array($sqluser);


$Hora= date('H:i:s');
//$hora = getdate(time());
$horaingreso= $Hora;
//$hora["hours"] . ":" . $hora["minutes"] . ":" . $hora["seconds"]; 
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<script language="JavaScript" type="text/javascript" src="ajax.js"></script>
<script src="jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.uniform.js" type="text/javascript" charset="utf-8"></script>
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="tcal.css" />
<script type="text/javascript" src="tcal.js"></script> 

<script type="text/javascript">
/*Code By CarlosPC.net*/
$(document).ready(function() {
$(".Contenido").hide(); //Para ocultar los DIV's con contenido
$("ul.tabs li:first").addClass("active").show(); //Activamos el primer TAB
$(".Contenido:first").show(); //Muestra el contenido respectivo al primer TAB
 
//Al clickar sobre los Tabs
$("ul.tabs li").click(function() {
$("ul.tabs li").removeClass("active"); //Anula todas las selecciones
$(this).addClass("active"); //Asigna la clase Active al TAB Seleccionado
$(".Contenido").hide(); //Esconde todo el contenido de la tab
var activeTab = $(this).find("a").attr("href"); //Ubica los valores HREF y A para enlazarlos y activarlos
$(activeTab).fadeIn(); //Habilita efecto Fade en la transición de contenidos
return false;
});
});


</script>

<script type="text/javascript" charset="utf-8">
      $(function(){
        $("input, textarea, select, button").uniform();
      });
    </script>

<link rel="stylesheet" href="css/uniform.default.css" type="text/css" media="screen">

<script type="text/javascript">
function validarcontra()
    {  
      grabarcontratantes();
	  mostrarcontratante();
	  ocultar_desc('clienbus');   
    }

function mostrar_desc(objac)
		{
		
		if(document.getElementById(objac).style.display=="none")
		document.getElementById(objac).style.display=""
		else
		document.getElementById(objac).style.display="";
		}
		
	
function ocultar_desc(objac2)
		{
		
		if(document.getElementById(objac2).style.display=="")
		document.getElementById(objac2).style.display="none";
		else
		document.getElementById(objac2).style.display="none";
		}	
				
function gbbiennes()
    { 
	  addgbbiens();
	  alert("Bien grabado satisfactoriamente");
	  ocultar_desc('newbiennnes');
       listadobien();
	  }
	
function validarpago()
    {  vertipoactopat();
       mostrar_desc('vpago');
       ocultar_desc('vbien');
	   ocultar_desc('vuif');
    }
	


function selecpsm(valor)
    {  document.frmprotocolares.tpsm.value=valor;
    }	
	
function actkardex()
    {  actualizarkardex();
       alert("Kardex Actualizado");
    }

function enviarvalores(valor)
    {   
	if(valor=="8"){
	mostrar_desc('vterrestres');
	ocultar_desc('mequipos');
	ocultar_desc('oespecificos');
	document.frmprotocolares.tpsm.value="";
	document.frmprotocolares.npsm.value="";
	document.frmprotocolares.oespecific.value="";
	document.frmprotocolares.smaquiequipo.value="";
	}
		
	if(valor=="5"){
	mostrar_desc('mequipos');
	ocultar_desc('vterrestres');
	ocultar_desc('oespecificos');
	document.frmprotocolares.tpsm.value="";
	document.frmprotocolares.npsm.value="";
	document.frmprotocolares.oespecific.value="";
	document.frmprotocolares.smaquiequipo.value="";
	}
		
	if(valor=="10"){
	mostrar_desc('oespecificos');
	ocultar_desc('vterrestres');
	ocultar_desc('mequipos');
	document.frmprotocolares.tpsm.value="";
	document.frmprotocolares.npsm.value="";
	document.frmprotocolares.oespecific.value="";
	document.frmprotocolares.smaquiequipo.value="";
	}
	
	if(valor!="5" && valor!="8" && valor!="10"){ 
	ocultar_desc('vterrestres');
	ocultar_desc('mequipos');
	ocultar_desc('oespecificos');
	document.frmprotocolares.tpsm.value="";
	document.frmprotocolares.npsm.value="";
	document.frmprotocolares.oespecific.value="";
	document.frmprotocolares.smaquiequipo.value="";
	}
    }
	
function validarbien()
    { mostrar_desc('vbien');
       ocultar_desc('vpago');
       ocultar_desc('vuif');
    }
	

function grabarmediopago()
    { grabarmp();
	  mostrar_desc('editmp');
      ocultar_desc('gbrmp'); 
	  alert("Datos Grabados Satisfactoriamente");  
	  
    }
	
function grabaruifp()
    { grabaruifppp();
	  mostrar_desc('edituifp');
      ocultar_desc('gbruifp'); 
	  alert("Datos Grabados Satisfactoriamente");  
    }

function editarmediopago()
    { editarmp();
	  alert("Datos Actualizados Satisfactoriamente");  
    }
	
function editarruifp()
    { editaruifp();
	  alert("Datos Actualizados Satisfactoriamente");  
    }
	

/*function elimrrpp()
    { elimmrp();
	  alert("Registro Eliminado Satisfactoriamente");  
	   mostrarnewreg();
    }

*/
function newgbrmp()
    {  
	    gggppp();
	    mostrarlistmpp();
	    alert("Medio de Pago Grabado Satisfactoriamente");
    }

function validaruif()
    {    mostrar_desc('vuif');
       ocultar_desc('vpago');
       ocultar_desc('vbien');
	 
    }

function vermedio(valor)
    { 
    if(valor=="SI")mostrar_desc('newpagoo');
	else ocultar_desc('newpagoo');
	if(valor=="NO")ocultar_desc('newpagoo');
	else mostrar_desc('newpagoo');
    }

function vernewpatri()
    {   mostrar_desc('newpatrimonio');
	    ocultar_desc('listpatrimonio');
    }

function mmmppp()
    {   mostrar_desc('regmedpago');
	    ocultar_desc('listmedpago'); 
		document.frmprotocolares.impmediopago.value="";
     document.frmprotocolares.fechaoperacion.value="";
	document.frmprotocolares.documentos.value="";
    }

function verlistpatri()
    {   mostrar_desc('listpatrimonio');
	ocultar_desc('newpatrimonio');
	
    }

function agregarbienes()
    {   mostrar_desc('newbiennnes');
	      document.frmprotocolares.ubigens.value="";
          document.frmprotocolares.fechaconst.value="";
	      document.frmprotocolares.codubis.value="";
	      document.frmprotocolares.npsm.value="";
	      document.frmprotocolares.tpsm.value="";
		  document.frmprotocolares.smaquiequipo.value="";
	      document.frmprotocolares.oespecific.value="";

    }

function cambiar()
    {    tipoacto();
	      mostrar_desc('menuactos');
		  document.frmprotocolares.referencia.value="";
          document.frmprotocolares.codactos.value="";
	document.frmprotocolares.contrato.value="";
	document.frmprotocolares.dregistral.value="";
	document.frmprotocolares.dnotarial.value="";
	document.frmprotocolares.kardexconexo.value="";
	document.frmprotocolares.idnotario.value="";
	 
    }


function limpiacli()
    {   document.frmprotocolares.numdoc.value="";
    }

function estadorrpp(valor)
{
    document.frmprotocolares.conestado.value = valor;

	if(valor=="I"){
	mostrar_desc('ntitulo');
	ocultar_desc('mayor');
	document.frmprotocolares.mayorderecho.value = ""; 
	document.frmprotocolares.numero.value = "";    
	    }
	
	if(valor!="I"){
	ocultar_desc('ntitulo');
	ocultar_desc('mayor');
	document.frmprotocolares.mayorderecho.value = ""; 
	document.frmprotocolares.numero.value = "";  
	  
    }

}

function mostrarubigeoo(id,name)
    {
  document.frmprotocolares.ubigen.value = id;
  document.frmprotocolares.codubi.value = name;  
  ocultar_desc('buscaubi');     
        
    }
function mostrarubigeoos(id,name)
    {
  document.frmprotocolares.ubigens.value = id;
  document.frmprotocolares.codubis.value = name;   
  ocultar_desc('buscaubis');       
    }
function mostrarubigeoosc(id,name)
    {
  document.frmprotocolares.ubigensc.value = id;
  document.frmprotocolares.codubisc.value = name;  
  ocultar_desc('buscaubisc');        
    }
	
function grabarfirmacontra()
{
grabarfirma();
mostrarcontratante();
document.frmprotocolares.fecfirmaa.value = "";
document.frmprotocolares.firmitaa.value = "";
ocultar_desc('firmasss');
}
	
	
function valida()
    {
        if(frmprotocolares.codactos.value==""){
        alert("Los campos de codigo de actos, contratos o tipos de kardex estan vacios o no han sido seleccionados, por favor ingresar datos");
        frmprotocolares.contrato.focus();
        retun
        }else{
		generakardex();
		mostrar_desc('tabsss');
		ocultar_desc('menuactos');
		}	
        
    }

function limpiarrpp()
    {  
document.frmprotocolares.titulorp.value = "";
document.frmprotocolares.importee.value ="";
document.frmprotocolares.anotacion.value = "";
document.frmprotocolares.numeroo.value = "";
document.frmprotocolares.mayorderecho.value = "";
document.frmprotocolares.observa.value = "";
    }

function validar2()
    {  
      condiciones();
	   mostrar_desc('menucondicion');
    }
function validar2k()
    {  
       condicionesk();
	   mostrar_desc('menucondicionk');
    }


function grabareditarcontratante()
    {  
      grabareditarcontraaaa();
	  alert("Datos del Contratante Actualizados");
	  ocultar_desc('mantecontra');
	  mostrarcontratante();
    }


function mostraridcontratante(valor){
document.frmprotocolares.firmitaa.value = valor;
mostrar_desc('firmasss');
}

function valorreg(valor){
document.frmprotocolares.pre2.value = valor;
document.frmprotocolares.presu.value = valor;
document.frmprotocolares.saldo2.value = valor;
}

function valornot(valor){
document.frmprotocolares.pre1.value = valor;
document.frmprotocolares.saldo1.value = valor;

}
	
function validarformular(valor)
    {  
     mostrar_desc('preguntas');
	 document.frmprotocolares.idcontratantee.value = valor;
    }
	
function validar4()
	 {  
	    mostrar_desc('uifpdtparticip');
		mostraruifpdtparticipante()
    }	
	
function mostrar(isChecked, myValue)
{	
	total = document.frmprotocolares.contrato.value;
	separador=" / ";
	quitar=myValue + separador;
	nuevoStr="";
	if (isChecked) document.frmprotocolares.contrato.value = total + myValue + separador;

	else document.frmprotocolares.contrato.value = total.replace(quitar,nuevoStr);
}

function mostrarfirma(isChecked, myValue)
{ 
    total = document.frmprotocolares.firma.value;
	remplazo="0";
	if (isChecked) document.frmprotocolares.firma.value = total.replace(total,"") + myValue;

	else document.frmprotocolares.firma.value = total.replace(total,remplazo);
}

function mostrarfirma2(isChecked, myValue)
{ 
    totalw = document.frmprotocolares.firmaa.value;
	remplazo="0";
	if (isChecked) document.frmprotocolares.firmaa.value = totalw.replace(totalw,"") + myValue;

	else document.frmprotocolares.firmaa.value = totalw.replace(totalw,remplazo);
}

function mostrarfirma3(isChecked, myValue)
{ 
    totalw = document.frmprotocolares.firmaa.value;
	remplazo="1";
	if (isChecked) document.frmprotocolares.firmaa.value = totalw.replace(totalw,"") + remplazo;

	else document.frmprotocolares.firmaa.value = totalw.replace(totalw,myValue);
}



function mostrarindice(isChecked, myValue)
{ 
    total = document.frmprotocolares.indice.value;
	remplazo="0";
	if (isChecked) document.frmprotocolares.indice.value = total.replace(total,"") + myValue;

	else document.frmprotocolares.indice.value = total.replace(total,remplazo);
}

function mostrarindice2(isChecked, myValue)
{ 
    total = document.frmprotocolares.indice2.value;
	remplazo="0";
	if (isChecked) document.frmprotocolares.indice2.value = total.replace(total,"") + myValue;

	else document.frmprotocolares.indice2.value = total.replace(total,remplazo);
}
function mostrarindice3(isChecked, myValue)
{ 
    total = document.frmprotocolares.indice2.value;
	remplazo="1";
	if (isChecked) document.frmprotocolares.indice2.value = total.replace(total,"") + remplazo;

	else document.frmprotocolares.indice2.value = total.replace(total,myValue);
}

function seleccioncontratanteeli(valor){
document.frmprotocolares.idcontra.value=valor;
}

function mostedi(){
mostrar_desc('mantecontra');
editcontra();


}


function mosteli(){
 mosteliminarc();
 alert("Contratante Eliminado");
 mostrarcontratante();
 ocultar_desc('clienedit');

}

function seleccionarcontra(valor) {

document.frmprotocolares.representaa.value=valor;
ocultar_desc('representante');
}

function seleccionarcontrac(valor) {

document.frmprotocolares.representaa2.value=valor;
ocultar_desc('representantee');
}

function buttons(valor) {
document.frmprotocolares.repre.value=valor;
ocultar_desc('representante');
document.frmprotocolares.representaa.value="";
document.frmprotocolares.facultades.value="";
}

function buttons23(valor) {
document.frmprotocolares.repre.value=valor;
mostrar_desc('representante');
mostrarcontrata();

}

function buttonsc(valor) {
document.frmprotocolares.repre2.value=valor;
ocultar_desc('representantee');
document.frmprotocolares.representaa2.value="";
document.frmprotocolares.facultadess.value="";

}
function buttons23c(valor) {
document.frmprotocolares.repre2.value=valor;
mostrar_desc('representantee');
mostrarcontratac();

}

function newmove() {
mostrar_desc('newmrrpp');
}


function seleccionmov(valor, name) {
document.frmprotocolares.codmovreg.value=valor;
document.frmprotocolares.itemcodmovreg.value=name;
}

function validanewmovreg() {
grabarnewmov();
mostrarnewreg();
ocultar_desc('newmrrpp');
alert("Movimiento grabado satisfactoriamente");
}

function calcularrrpp() {
mostrar_desc('formurent');
}

function validarformul() {
mostrar_desc('formurent');
}

function grabar_renta() {
grabarrenta();
}

function grabarformulario() {
saveformulario();
listaformu();

}

function formulita(valor) {
document.frmprotocolares.pregu1.value=valor;
calcularfrm();
}

function formulita1(valor) {
document.frmprotocolares.pregu2.value=valor;
calcularfrm();
}

function formulita2(valor) {
document.frmprotocolares.pregu3.value=valor;
calcularfrm();
}

function mostrar2(isChecked, name)
{
	total2 = document.frmprotocolares.codactos.value;
     quitar2=name;
	if (isChecked) document.frmprotocolares.codactos.value = total2 + name;

	else document.frmprotocolares.codactos.value = total2.replace(quitar2,"");
}

function mostrar3(isChecked, name, id)
{
	total3 = document.frmprotocolares.codcon.value;
	quitar3=name +"."+ id + "/";
	if (isChecked) document.frmprotocolares.codcon.value = total3 + name +"."+ id + "/";

	else document.frmprotocolares.codcon.value = total3.replace(quitar3,"");
}

function mostrarcon(isChecked, name, id)
{
	total4 = document.frmprotocolares.codconn.value;
	quitar4=name +"."+ id + "/";
	if (isChecked) document.frmprotocolares.codconn.value = total4 + name +"."+ id + "/";

	else document.frmprotocolares.codconn.value = total4.replace(quitar4,"");
}


-->
</script>
<script>
function refreshall()
    {  
	  mostrarcontratante();
	  mostrarnewreg();
	  // mostrarlistmpp();
    }
setInterval(refreshall, 1000); 
</script> 

<style type="text/css">
<!--
.submenutitu {
	font-family: Calibri;
	font-size: 18px;
	font-style: italic;
	color:#FF9900;
}
.titubusca {
	font-family: Calibri;
	font-size: 13px;
	color: #333333;
	font-style: italic;
}
-->
</style>
<style type="text/css">
<!--
.camposss {font-family: Calibri; font-style: italic; font-size: 14px; color: #333333; }


ul.tabs {margin: 0;  padding: 0;  float: left;  list-style: none;  height: auto;  width: 760px; border-left:2px solid #264965; border-bottom:2px solid #777; }
ul.tabs li { background:#264965; font-family:Calibri; color:#FF9900; float: left;  margin-left: 0px;  padding: 0; border: 2px solid #777; overflow: hidden; position: relative; border-left:0px; margin-bottom:-2px;}
ul.tabs li a {text-decoration: none; font-family:Calibri; color:#FF9900; background:#264965; display: block; font-size: 14px; font-weight:bold; padding: 4px 20px; }
ul.tabs li a:hover {background:#FF9900; font-family:Calibri; color:#264965}
ul.tabs li.active, html ul.tabs li.active a:hover  {background:#FF9900; border-bottom: 2px solid #eee; margin-bottom:-2px;}
 
.Contenedor{border: 2px solid #777; border-top: none; overflow: hidden; clear: both; float: left; width: 760px; background: #ffff;
-webkit-border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-moz-border-radius-bottomright: 8px;
-moz-border-radius-bottomleft: 8px;
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;
}
.Contenido {padding: 15px; font-size: 12px;}
-->

<style type="text/css">
<!--

.slectcontratantes {
	font-family: Calibri;
	font-size: 12px;
	color: #FFFFFF;
}

div.representante {
	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:638px;
	height:220px;
	position:absolute;
	left: 549px;
	top: 180px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=50)"; /* expected to work in IE 8 */
	filter: alpha(opacity=50);   /* IE 4-7 */
	zoom: 1;
}

div.allcontrata {width:600px; height:150px; overflow:auto;}
div.newproto
{ 
background-color: #ffffff;
border: 4px solid #264965;  
-moz-border-radius: 13px;
-webkit-border-radius: 13px;
border-radius: 13px;
-moz-box-shadow: 0px 0px 5px #000000;
-webkit-box-shadow: 0px 0px 5px #000000;
box-shadow: 0px 0px 5px #000000;
width:820px; height:750px;
}


div.buscar{ width:620px; height:420px;
 background-color: #264965;
border: 4px solid #264965;
-moz-border-radius: 13px;
-webkit-border-radius: 13px;
border-radius: 13px;
-moz-box-shadow: 0px 0px 5px #000000;
-webkit-box-shadow: 0px 0px 5px #000000;
box-shadow: 0px 0px 5px #000000;  }

div.mante{ width:310px; height:420px;
background-color: #264965;
border: 4px solid #264965;
-moz-border-radius: 13px;
-webkit-border-radius: 13px;
border-radius: 13px;
-moz-box-shadow: 0px 0px 5px #000000;
-webkit-box-shadow: 0px 0px 5px #000000;
box-shadow: 0px 0px 5px #000000;  }

div.contratantes{ width:728px; height:250px; overflow:auto;  }

.editcampp {font-family: Calibri; font-style: italic; font-size: 14px; color: #FFFFFF; }

.titulomenuacto { font-family:Calibri; color:#FFFFFF; font-size:14px; font-style:italic;
}

div.tipoacto{ width:740px; height:150px; overflow:auto;}
div.newproto1 {  background-color: #ffffff;
border: 4px solid #264965;  

-moz-border-radius: 13px;
-webkit-border-radius: 13px;
border-radius: 13px;
-moz-box-shadow: 0px 0px 5px #000000;
-webkit-box-shadow: 0px 0px 5px #000000;
box-shadow: 0px 0px 5px #000000;
width:800px; height:600px;
}
.kardex{ font-family:Calibri; font-size:24px; font-style:italic; color:#003366}
div.menucondicion{
	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:750px;
	height:220px;
	position:absolute;
	left: 460px;
	top: 95px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=50)"; /* expected to work in IE 8 */
	filter: alpha(opacity=50);   /* IE 4-7 */
	zoom: 1;
}

div.clienedit {
	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:760px;
	height:299px;
	position:absolute;
	left: 494px;
	top: 274px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=70)"; /* expected to work in IE 8 */
	filter: alpha(opacity=70);   /* IE 4-7 */
	zoom: 1;
}
div.uifpdtparticip{
	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:760px;
	height:299px;
	position:absolute;
	left: 491px;
	top: 333px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=70)"; /* expected to work in IE 8 */
	filter: alpha(opacity=70);   /* IE 4-7 */
	zoom: 1;
}

div.menuactos {
	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:760px;
	height:220px;
	position:absolute;
	left: 490px;
	top: 179px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=50)"; /* expected to work in IE 8 */
	filter: alpha(opacity=50);   /* IE 4-7 */
	zoom: 1;
}
div.menuactos2 {
	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:759px;
	height:220px;
	position:absolute;
	left: 482px;
	top: 172px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=50)"; /* expected to work in IE 8 */
	filter: alpha(opacity=50);   /* IE 4-7 */
	zoom: 1;
}
div.asigna{ height:220px; width:728px; overflow:auto;


}
div.tipoacto2 {width:740px; height:150px; overflow:auto;}
div.clienbus {
	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:760px;
	height:299px;
	position:absolute;
	left: 493px;
	top: 270px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=70)"; /* expected to work in IE 8 */
	filter: alpha(opacity=70);   /* IE 4-7 */
	zoom: 1;
}
.Estilo7 {font-family: Calibri; font-weight: bold; font-style: italic; color: #FFFFFF; }
.Estilo15 {font-size: 12px; font-weight: bold; font-family: Calibri;}
.Estilo18 {font-family: Calibri; font-weight: bold; }
.Estilo21 {font-family: Calibri; color: #003399; }
.Estilo23 {font-family: Calibri; color: #003399; font-weight: bold; }
.Estilo31 {font-family: Calibri; font-size: 13px; font-style: italic; }
.style1 {
	font-size: 14px;
	font-weight: bold;
}
.style2 {
	font-family: Calibri;
	font-size: 14px;
	font-style: italic;
	font-weight: bold;
}
.Estilo40 {font-family: Calibri; color: #666666; }
.Estilo42 {font-family: Calibri; font-style: italic; font-size: 14px; color: #333333; font-weight: bold; }
.btnpatrimonial {color: #FFFFFF; font-family: Calibri; font-style: italic; font-weight: bold; }
.titupatrimo {font-size: 12; font-style: italic; font-family: Calibri;}
.Estilo43 {color: #333333}
.Contenedor1 {border: 2px solid #777; border-top: none; overflow: hidden; clear: both; float: left; width: 760px; background: #ffff;
-webkit-border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-moz-border-radius-bottomright: 8px;
-moz-border-radius-bottomleft: 8px;
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;
}
div.clienbus1 {	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:760px;
	height:299px;
	position:absolute;
	left: 493px;
	top: 270px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=70)"; /* expected to work in IE 8 */
	filter: alpha(opacity=70);   /* IE 4-7 */
	zoom: 1;
}
div.clienedit1 {	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:760px;
	height:299px;
	position:absolute;
	left: 494px;
	top: 274px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=70)"; /* expected to work in IE 8 */
	filter: alpha(opacity=70);   /* IE 4-7 */
	zoom: 1;
}
div.menuactos1 {	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:760px;
	height:220px;
	position:absolute;
	left: 490px;
	top: 179px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=50)"; /* expected to work in IE 8 */
	filter: alpha(opacity=50);   /* IE 4-7 */
	zoom: 1;
}
div.menuactos21 {	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:759px;
	height:220px;
	position:absolute;
	left: 482px;
	top: 172px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=50)"; /* expected to work in IE 8 */
	filter: alpha(opacity=50);   /* IE 4-7 */
	zoom: 1;
}
div.uifpdtparticip1 {	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:760px;
	height:299px;
	position:absolute;
	left: 491px;
	top: 333px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=70)"; /* expected to work in IE 8 */
	filter: alpha(opacity=70);   /* IE 4-7 */
	zoom: 1;
}
-->
</style>
</head>

<body>
<div class="newproto" id="newproto">
  <table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td><form id="frmprotocolares" name="frmprotocolares" method="post" action="actualizar_kardex.php">
          <table width="820" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="36" height="28" align="center" bgcolor="#264965"><img src="iconos/nuevo2.png" width="20" height="22" /></td>
              <td width="745" bgcolor="#264965"><span class="submenutitu">Nuevo Kardex</span></td>
            </tr>
            <tr>
              <td colspan="2"><table width="757" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="246" height="26" valign="bottom"><span class="camposss">Tipo de Kardex : </span></td>
                    <td width="117" height="26" valign="bottom"><span class="camposss">Fecha de Ingreso</span></td>
                    <td width="103" align="left" valign="bottom" class="camposss">&nbsp;</td>
                    <td width="157" height="26" valign="bottom" class="camposss">&nbsp;</td>
                    <td width="143" rowspan="3" align="center" valign="middle"><div id="resultado" style="width:100px;"><a href='#' onClick="valida()"><img src='imagenes/generar.jpg' width='95' title='Editar Usuario' height='29' border='0' /></a></div></td>
                  </tr>
                  <tr>
                    <td height="31"><select name="idtipkar" id="idtipkar" onChange="cambiar()">
                        <option value = "" selected="selected">SELECCIONAR TIPO DE KARDEX</option>
                        <?php
		  while($row=mysql_fetch_array($sql)){
		  echo "<option value = ".$row["idtipkar"].">".nl2br($row["nomtipkar"])."</option>";  
		  }
		?>
                    </select></td>
                    <td height="31"><input type="text" readonly="readonly" name="fechaingreso" id="fecha_ingreso"  size="18" value="<?php echo date("d/m/Y"); ?>" 
 /></td>
                    <td width="103" align="center" valign="middle"><label>
                      <input name="horaingreso" readonly="readonly" type="hidden" value="<?php echo $horaingreso; ?>" id="horaingreso" size="15" />
                    </label></td>
                    <td height="31" align="right" class="kardex">Nº Kardex:</td>
                  </tr>
                  <tr>
                    <td height="28" colspan="4" valign="bottom"><table width="601" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="75" height="27"><span class="camposss">Referencia :</span></td>
                          <td width="526"><input name="referencia" style="text-transform:uppercase" type="text" id="referencia" size="80" /></td>
                        </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td height="28" colspan="5"><table width="697" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="96"><span class="camposss">Codigo de  Actos
                            <label></label>
                          </span></td>
                          <td width="72"><span class="camposss">
                            <input name="codactos"  type="text" id="codactos" size="12" />
                          </span></td>
                          <td width="161" align="right" class="camposss">Derecho Notarial :</td>
                          <td width="109"><label>
                            <input name="dnotarial" type="text" id="dnotarial" size="10" onChange="valornot(this.value)"  />
                          </label></td>
                          <td width="113" align="right" class="camposss">Derecho Registral :</td>
                          <td width="146"><input name="dregistral" type="text" id="dregistral" size="10" onChange="valorreg(this.value)" /></td>
                        </tr>
                      </table>
                        <label></label></td>
                  </tr>
                  <tr>
                    <td height="14" colspan="5" class="camposss"><table width="765" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="97">Contrato</td>
                          <td width="689"><table width="682" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td width="506" height="27"><label>
                                  <input name="contrato" type="text" id="contrato" style="text-transform:uppercase" size="80" />
                                  </label>
                                </td>
                                <td width="84"><a onClick="tipoacto();mostrar_desc('menuactos');ocultar_desc('menuactos2')"><img src="iconos/addacto.png" width="75" height="29" /></a>
                                    <div id="menuactos" class="menuactos1" style="display:none; z-index:2;" >
                                      <table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
                                        <tr>
                                          <td height="29" colspan="2" class="style30"><table width="196" border="0" cellspacing="0" cellpadding="0">
                                              <tr>
                                                <td width="16">&nbsp;</td>
                                                <td width="180"><span class="titulomenuacto">Seleccione Acto(s)</span></td>
                                              </tr>
                                          </table></td>
                                          <td width="21" align="right" valign="middle">&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td height="50" colspan="3"><div id="tipoacto" class="tipoacto"></div></td>
                                        </tr>
                                        <tr>
                                          <td width="607" height="10">&nbsp;</td>
                                          <td width="132"><a href='#' onClick="ocultar_desc('menuactos')"><img src="iconos/aceptar.png" width="95" height="29" border="0" /></a></td>
                                          <td height="10">&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td colspan="3" align="center" valign="middle"></td>
                                        </tr>
                                        <tr></tr>
                                      </table>
                                    </div></td>
                                <td width="92"><a onClick="tipoacto2kit();mostrar_desc('menuactos2');ocultar_desc('menuactos')"><img src="iconos/delacto.png" width="75" height="29" /></a>
                                    <div id="menuactos2" class="menuactos21" style="display:none; z-index:3;" >
                                      <table width="755" border="0" align="center" cellpadding="0" cellspacing="0">
                                        <tr>
                                          <td height="29" colspan="2" class="style30"><table width="196" border="0" cellspacing="0" cellpadding="0">
                                              <tr>
                                                <td width="16">&nbsp;</td>
                                                <td width="180"><span class="titulomenuacto">Quitar Acto(s)</span></td>
                                              </tr>
                                          </table></td>
                                          <td width="21" align="right" valign="middle">&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td height="50" colspan="3"><div id="tipoacto2" class="tipoacto2"></div></td>
                                        </tr>
                                        <tr>
                                          <td width="607" height="10">&nbsp;</td>
                                          <td width="132"><a href='#' onClick="ocultar_desc('menuactos2')"><img src="iconos/aceptar.png" width="95" height="29" border="0" /></a></td>
                                          <td height="10">&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td colspan="3" align="center" valign="middle"></td>
                                        </tr>
                                        <tr></tr>
                                      </table>
                                    </div></td>
                              </tr>
                          </table></td>
                        </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td height="32" colspan="5"> ------------------------------------------------------------------------------------------------------------------------------</td>
                  </tr>
                  <tr>
                    <td height="14" colspan="5"><div id="firmasss" style="position:absolute; display:none; width:247px; height:91px; left: 410px; top: 389px; z-index:15; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
                        <table width="241" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="16" height="24">&nbsp;</td>
                            <td width="193" class="camposss">Fecha Firma:</td>
                            <td width="32"><a href="#" onClick="ocultar_desc('firmasss')"><img src="iconos/cerrar.png" width="21" height="20" border="0" /></a></td>
                          </tr>
                          <tr>
                            <td rowspan="2">&nbsp;</td>
                            <td height="30" colspan="2"><label>
                              <input name="fecfirmaa" type="text" class="tcal" id="fecfirmaa" size="20" />
                              <input name="firmitaa" type="hidden" id="firmitaa" size="10" />
                            </label></td>
                          </tr>
                          <tr>
                            <td colspan="2"><a href="#" onClick="grabarfirmacontra()"><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></td>
                          </tr>
                        </table>
                    </div>
                        <div id="patrimoniallll" style="position:absolute; display:none; width:745px; height:415px; left: 51px; top: 327px; z-index:17; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
                          <table width="743" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="11" height="25">&nbsp;</td>
                              <td width="697"><img src="iconos/patri.png" width="300" height="25" border="0" usemap="#Map" /></td>
                              <td width="32"><a href="#" onClick="ocultar_desc('patrimoniallll')"><img src="iconos/cerrar.png" width="21" height="20" border="0" /></a></td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td colspan="2"><div id="newpatrimonio" style="display:none">
                                <table width="718" border="1" cellpadding="0" cellspacing="0" bordercolor="#333333">
                                    <tr>
                                      <td width="236" height="35" align="center" bgcolor="#666666"><a onClick="validarpago()"><span class="btnpatrimonial">Medio de Pago</span></a></td>
                                      <td width="215" align="center" bgcolor="#666666"><a onClick="validarbien()"><span class="btnpatrimonial">Información del Bien</span></a></td>
                                      <td width="259" align="center" bgcolor="#666666"><a onClick="validaruif()"><span class="btnpatrimonial">Información SAT/UIF</span></a></td>
                                    </tr>
                                    <tr>
                                      <td height="312" colspan="3" valign="top"><div id="vuif" style="display:none">
                                          <table width="680" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                              <td width="24" height="30">&nbsp;</td>
                                              <td width="125"><span class="titupatrimo">Partida Registral</span></td>
                                              <td width="224" height="30"><span class="titupatrimo">
                                                <input name="pregis" style="background:#FFFFFF" type="text" id="pregis" size="20" />
                                              </span></td>
                                              <td height="30" class="titupatrimo">N° Registral</td>
                                              <td height="30"><span class="titupatrimo">
                                                <input name="nregis" style="background:#FFFFFF" type="text" id="nregis" size="20" />
                                              </span></td>
                                            </tr>
                                            <tr>
                                              <td height="30">&nbsp;</td>
                                              <td height="30"><span class="titupatrimo">Sede Registral</span></td>
                                              <td height="30"><span class="titupatrimo">
                                                <select name="idsedereg2" id="idsedereg2">
                                                  <?php
	       while($rowsedess = mysql_fetch_array($sqlsedess)){
	         echo "<option value=".$rowsedess['idsedereg'].">".$rowsedess['dessede']."</option> \n";
             }
	     ?>
                                                </select>
                                              </span></td>
                                              <td width="116" height="30"><span class="titupatrimo">Forma de Pago</span></td>
                                              <td width="191" height="30"><span class="titupatrimo">
                                                <select name="fpago" id="fpago">
                                                  <option value="C">CONTADO</option>
                                                  <option value="P">PLAZO</option>
                                                </select>
                                              </span></td>
                                            </tr>
                                            <tr>
                                              <td height="30" rowspan="2" class="titupatrimo">&nbsp;</td>
                                              <td height="30" class="titupatrimo">Oport. de Pago</td>
                                              <td height="30"><span class="titupatrimo">
                                                <label></label>
                                                </span><span class="titupatrimo">
                                                <select name="oporpago" id="oporpago">
                                                  <?php
	       while($rowopor = mysql_fetch_array($sqloporpago)){

	         echo "<option value=".$rowopor['idoppago'].">".$rowopor['desoppago']."</option> \n";
             }
	     ?>
                                                </select>
                                              </span></td>
                                              <td height="30"><span class="titupatrimo">Origen de Fondos</span></td>
                                              <td height="30"><span class="titupatrimo">
                                                <label></label>
                                                <input name="ofpago" style="background:#FFFFFF" type="text" id="ofpago" size="20" />
                                              </span></td>
                                            </tr>
                                            <tr>
                                              <td height="30" class="titupatrimo">&nbsp;</td>
                                              <td height="30">&nbsp;</td>
                                              <td height="30">&nbsp;</td>
                                              <td height="30"><div id="gbruifp" style="display:;"><a href="#" onClick="grabaruifp()"><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></div>
                                                  <div id="edituifp" style="display:none;"><a href="#" onClick="editarruifp()"><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></div></td>
                                            </tr>
                                          </table>
                                      </div>
                                          <div id="vpago" style="display:none">
                                            <table width="700" border="0" cellspacing="0" cellpadding="0">
                                              <tr>
                                                <td><table width="705" border="0" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                      <td height="19">&nbsp;</td>
                                                      <td width="131" height="19">&nbsp;</td>
                                                      <td width="270" height="19">&nbsp;</td>
                                                      <td width="113" height="19">&nbsp;</td>
                                                      <td width="176" height="19">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                      <td height="19">&nbsp;</td>
                                                      <td height="30" align="center"><span class="titupatrimo">Tipo de Acto:</span></td>
                                                      <td height="30"><div id="tpacto" style="display:"></div></td>
                                                      <td height="30" class="titupatrimo">Fecha Minuta</td>
                                                      <td height="30"><label>
                                                        <input name="nnminuta" type="text" style="background:#FFFFFF" class="tcal" id="nnminuta" size="20" />
                                                      </label></td>
                                                    </tr>
                                                    <tr>
                                                      <td width="15" height="30">&nbsp;</td>
                                                      <td height="30" align="center"><span class="titupatrimo">Importe de laTransaccion:</span></td>
                                                      <td height="30"><span class="titupatrimo">
                                                        <label></label>
                                                        <input name="imptrans" style="background:#FFFFFF" type="text" id="imptrans" size="20" />
                                                      </span></td>
                                                      <td height="30"><span class="titupatrimo">Tipo Moneda</span></td>
                                                      <td height="30"><span class="titupatrimo">
                                                        <label></label>
                                                        <select name="tipomoneda" id="tipomoneda">
                                                          <?php
	       while($rowmoneda = mysql_fetch_array($sqlmon)){

	         echo "<option value=".$rowmoneda['idmon'].">".$rowmoneda['desmon']."</option> \n";
             }
	     ?>
                                                        </select>
                                                      </span></td>
                                                    </tr>
                                                    <tr>
                                                      <td height="30">&nbsp;</td>
                                                      <td height="30" align="center"><span class="titupatrimo">Exhibio medio de pago</span></td>
                                                      <td height="30"><span class="titupatrimo">
                                                        <label></label>
                                                        <select name="exibio" id="exibio" onChange="vermedio(this.value)">
                                                          <option value="SI">SI</option>
                                                          <option value="NO" selected="selected">NO</option>
                                                        </select>
                                                      </span></td>
                                                      <td height="30"><span class="titupatrimo">Tipo de Cambio</span></td>
                                                      <td height="30"><span class="titupatrimo">
                                                        <input name="tipcambio" style="background:#FFFFFF" type="text" id="tipcambio" size="20" />
                                                      </span></td>
                                                    </tr>
                                                    <tr>
                                                      <td height="30" rowspan="2">&nbsp;</td>
                                                      <td height="30" align="center">&nbsp;</td>
                                                      <td height="30"><div id="ittmp"></div></td>
                                                      <td height="30">&nbsp;</td>
                                                      <td height="0"><div id="gbrmp" style="display:"><a href="#" onClick="grabarmediopago()"><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></div>
                                                          <div id="editmp" style="display:none"><a href="#" onClick="editarmediopago()"><img src="iconos/grabarmodi.png" width="94" height="29" border="0" /></a></div></td>
                                                    </tr>
                                                    <tr>
                                                      <td height="30" colspan="5"><div id="newpagoo" style="display:none;">
                                                          <table width="671" border="0" align="center" cellpadding="0" cellspacing="0">
                                                            <tr>
                                                              <td width="101" height="34"><a href="#" onClick="mmmppp()"><img src="iconos/neww2.png" width="94" height="29" border="0" /></a></td>
                                                              <td width="570"><a href="#" onClick="mostrar_desc('listmedpago');ocultar_desc('regmedpago')"><img src="iconos/neww3.png" width="94" height="29" border="0" /></a></td>
                                                            </tr>
                                                            <tr>
                                            <td colspan="2"><div id="regmedpago" style="display:none; border: #003366 solid 1px; background-color:#CCCCCC; position:absolute; width: 729px; left: 13px; top: 308px; height: 189px;">
                                                                  <table width="707" border="0" cellspacing="0" cellpadding="0">
                                                                    <tr>
                                                                      <td>&nbsp;</td>
                                                                      <td height="30" colspan="3" class="Estilo23 Estilo43">Nuevo Medio de Pago</td>
                                                                      <td height="30"><table width="187" border="0" cellpadding="0" cellspacing="0">
                                                                          <tr>
                                                                            <td width="138">&nbsp;</td>
                                                                            <td width="49"><a href="#" onClick="ocultar_desc('regmedpago')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
                                                                          </tr>
                                                                      </table></td>
                                                                    </tr>
                                                                    <tr>
                                                                      <td width="15">&nbsp;</td>
                                                                      <td width="116" height="30"><span class="titupatrimo">Medio de Pago</span></td>
                                                                      <td width="270" height="30"><select name="mediopago" id="mediopago">
                                                                          <?php
	       while($rowtpago = mysql_fetch_array($sqltpago)){

	         echo "<option value=".$rowtpago['codmepag'].">".$rowtpago['desmpagos']."</option> \n";
             }
	     ?>
                                                                        </select>                                                                      </td>
                                                                      <td width="119" height="30"><span class="titupatrimo">Importe Medio de Pago</span></td>
                                                                      <td width="187" height="30"><span class="titupatrimo">
                                                                        <label></label>
                                                                        <input name="impmediopago" style="background:#FFFFFF" type="text" id="impmediopago" size="20" />
                                                                      </span></td>
                                                                    </tr>
                                                                    <tr>
                                                                      <td>&nbsp;</td>
                                                                      <td height="30"><span class="titupatrimo">Entidad Financiera</span></td>
                                                                      <td height="30"><select name="entidadfinanciera" id="entidadfinanciera">
                                                                        <?php
	       while($rowbanco = mysql_fetch_array($sqlbancos)){

	         echo "<option value=".$rowbanco['idbancos'].">".$rowbanco['desbanco']."</option> \n";
             }
	     ?>
                                                                      </select></td>
                                                                      <td height="30" class="titupatrimo">Tipo Moneda</td>
                                                                      <td height="30"><label>
                                                                        <select name="select" id="select">
                                                                          <option value="S">SOLES</option>
                                                                          <option value="D">DOLARES</option>
                                                                        </select>
                                                                      </label></td>
                                                                    </tr>
                                                                    <tr>
                                                                      <td>&nbsp;</td>
                                                                      <td height="30"><span class="titupatrimo">Fecha de Operación</span></td>
                                                                      <td height="30"><span class="titupatrimo">
                                                                        <input name="fechaoperacion" style="background:#FFFFFF" type="text" id="fechaoperacion" class="tcal" size="20" />
                                                                      </span></td>
                                                                      <td height="30">&nbsp;</td>
                                                                      <td height="30">&nbsp;</td>
                                                                    </tr>
                                                                    <tr>
                                                                      <td>&nbsp;</td>
                                                                      <td height="30"><span class="titupatrimo">Documentos</span></td>
                                                                      <td height="30" colspan="2"><span class="titupatrimo">
                                                                        <input name="documentos" style="background:#FFFFFF" type="text" id="documentos" size="50" />
                                                                      </span></td>
                                                                      <td height="30"><span class="titupatrimo"><a href="#" onClick="newgbrmp();ocultar_desc('regmedpago')"><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></span></td>
                                                                    </tr>
                                                                </table>
                                                              </div>
                                                                  <div id="listmedpago" style="display:none; width:680px; height:100px; overflow:auto;"></div></td>
                                                            </tr>
                                                          </table>
                                                      </div></td>
                                                    </tr>
                                                </table></td>
                                              </tr>
                                              <tr>
                                                <td>&nbsp;</td>
                                              </tr>
                                            </table>
                                          </div>
                                        <div id="vbien" style="display:none">
                                            <table width="710" border="0" cellspacing="0" cellpadding="0">
                                              <tr>
                                                <td width="18">&nbsp;</td>
                                                <td width="692"><img src="iconos/biennes.png" alt="" width="181" height="25" border="0" usemap="#Map2" /></td>
                                              </tr>
                                              <tr>
                                                <td>&nbsp;</td>
                                                <td><div id="newbiennnes" style="display:none">
                                                  <table width="680" border="0" align="center" cellpadding="0" cellspacing="0">
                                                      <tr>
                                                        <td height="19">&nbsp;</td>
                                                        <td height="19">&nbsp;</td>
                                                        <td height="19">&nbsp;</td>
                                                        <td height="19">&nbsp;</td>
                                                      </tr>
                                                      <tr>
                                                        <td width="135" height="30"><span class="titupatrimo">Tipo</span></td>
                                                        <td width="208" height="30"><span class="titupatrimo">
                                                          <label></label>
                                                          <label>
                                                          <select name="tipob" id="tipob">
                                                            <option value="BIENES">BIENES</option>
                                                            <option value="ACCIONES Y DERECHOS">ACCIONES Y DERECHOS</option>
                                                          </select>
                                                          </label>
                                                        </span></td>
                                                        <td width="118" height="30">&nbsp;</td>
                                                        <td width="219" height="30"><span class="titupatrimo">
                                                          <label></label>
                                                        </span></td>
                                                      </tr>
                                                      <tr>
                                                        <td height="30"><span class="titupatrimo">Bien-Acto Jurídico</span></td>
                                                        <td height="30" colspan="2"><span class="titupatrimo">
                                                          <label></label>
                                                          <select name="tipobien" id="tipobien" onChange="enviarvalores(this.value)">
                                                            <?php
	       while($rowtbien = mysql_fetch_array($sqltbienn)){
	         echo "<option value=".$rowtbien['idtipbien'].">".$rowtbien['desestcivil']."</option> \n";
             }
	     ?>
                                                          </select>
                                                        </span></td>
                                                        <td height="30">&nbsp;</td>
                                                      </tr>
                                                      <tr>
                                                        <td height="30"><span class="titupatrimo">Ubigeo</span></td>
                                                        <td height="30" colspan="2"><input name="ubigens" type="text" id="ubigens" style="background:#FFFFFF" size="45" /></td>
                                                        <td height="30"><a href="#" onClick="mostrar_desc('buscaubis')"><img src="iconos/seleccionar.png" width="94" height="29" border="0" /></a>
                                                            <div id="buscaubis" style="position:absolute; display:none; width:637px; height:223px; left: 14px; top: 162px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
                                                              <table width="637" border="0" cellspacing="0" cellpadding="0">
                                                                <tr>
                                                                  <td width="24" height="29">&nbsp;</td>
                                                                  <td width="585" class="titupatrimo">Seleccionar Ubigeo:</td>
                                                                  <td width="28"><a href="#" onClick="ocultar_desc('buscaubis')"><img src="iconos/cerrar.png" width="21" height="20" border="0" /></a></td>
                                                                </tr>
                                                                <tr>
                                                                  <td>&nbsp;</td>
                                                                  <td><label>
                                                                    <input name="buscaubis" type="text" style="background:#FFFFFF" id="buscaubis" size="60" onKeyPress="buscaubigeoss()" />
                                                                  </label></td>
                                                                  <td>&nbsp;</td>
                                                                </tr>
                                                                <tr>
                                                                  <td>&nbsp;</td>
                                                                  <td><div id="resulubis" style="width:585px; height:150px; overflow:auto"></div></td>
                                                                  <td>&nbsp;</td>
                                                                </tr>
                                                                <tr>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                </tr>
                                                              </table>
                                                            </div>
                                                          <input name="codubis" type="hidden" id="codubis" size="15" /></td>
                                                      </tr>
                                                      <tr>
                                                        <td height="15"><span class="titupatrimo">Fecha de Add. o Cons.</span></td>
                                                        <td height="15"><span class="titupatrimo">
                                                          <label></label>
                                                          <label>
                                                          <input type="text" name="fechaconst" style="background:#FFFFFF" class="tcal" id="fechaconst" />
                                                          </label>
                                                        </span></td>
                                                        <td height="30" align="center">&nbsp;</td>
                                                        <td height="30"><a href="#" onClick="gbbiennes()"><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></td>
                                                      </tr>
                                                      <tr>
                                                        <td height="15"><div id="vterrestres" style="display:none; width:691px; height:83px; border:#003366 solid 1px; background:#CCCCCC; position:absolute; left: 21px; top: 228px;">
                                                            <table width="671" border="0" cellspacing="0" cellpadding="0">
                                                              <tr>
                                                                <td width="26">&nbsp;</td>
                                                                <td width="118">&nbsp;</td>
                                                                <td width="138">&nbsp;</td>
                                                                <td width="135">&nbsp;</td>
                                                                <td width="254">&nbsp;</td>
                                                              </tr>
                                                              <tr>
                                                                <td><label></label></td>
                                                                <td class="titupatrimo"><input type="radio" name="radio3" id="radio3" value="P" onClick="selecpsm(this.value)" />
                                                                  N° de Placa </td>
                                                                <td class="titupatrimo"><input type="radio" name="radio3" id="radio4" value="S" onClick="selecpsm(this.value)" />
                                                                  N° de Serie</td>
                                                                <td class="titupatrimo"><input type="radio" name="radio3" id="radio5" value="M" onClick="selecpsm(this.value)" />
                                                                  N° de Motor</td>
                                                              <td><label>
                                                                  <input type="text" name="npsm" style="background:#FFFFFF" id="npsm" />
                                                                </label></td>
                                                              </tr>
                                                              <tr>
                                                                <td>&nbsp;</td>
                                                                <td>&nbsp;</td>
                                                                <td>&nbsp;</td>
                                                                <td>&nbsp;</td>
                                                                <td><label>
                                                                  <input type="hidden" name="tpsm" id="tpsm" />
                                                                </label></td>
                                                              </tr>
                                                            </table>
                                                        </div>
                                                            <div id="mequipos" style="display:none; width:674px; height:71px; border:#003366 solid 1px; background:#CCCCCC; position:absolute; left: 25px; top: 226px;">
                                                              <table width="661" border="0" cellspacing="0" cellpadding="0">
                                                                <tr>
                                                                  <td width="32">&nbsp;</td>
                                                                  <td width="101">&nbsp;</td>
                                                                  <td width="128">&nbsp;</td>
                                                                  <td width="55">&nbsp;</td>
                                                                  <td width="345">&nbsp;</td>
                                                                </tr>
                                                                <tr>
                                                                  <td><label></label></td>
                                                                  <td colspan="3" align="center" class="titupatrimo"> N° de Serie para Maquinaris y Equipos</td>
                                                                  <td><label>
                                                                    <input type="text" name="smaquiequipo" style="background:#FFFFFF" id="smaquiequipo" />
                                                                  </label></td>
                                                                </tr>
                                                                <tr>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                </tr>
                                                              </table>
                                                            </div>
                                                          <div id="oespecificos" style="display:none; width:652px; height:71px; border:#003366 solid 1px; background:#CCCCCC; position:absolute; left: 23px; top: 229px;">
                                                              <table width="629" border="0" cellspacing="0" cellpadding="0">
                                                                <tr>
                                                                  <td width="69">&nbsp;</td>
                                                                  <td width="55">&nbsp;</td>
                                                                  <td width="120">&nbsp;</td>
                                                                  <td width="190">&nbsp;</td>
                                                                  <td width="195">&nbsp;</td>
                                                                </tr>
                                                                <tr>
                                                                  <td><label></label></td>
                                                                  <td colspan="3" align="center" class="titupatrimo"> Detalle del bien materia del acto juridico</td>
                                                                  <td><label>
                                                                    <input type="text" name="oespecific" style="background:#FFFFFF" id="oespecific" />
                                                                  </label></td>
                                                                </tr>
                                                                <tr>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                </tr>
                                                              </table>
                                                          </div></td>
                                                        <td height="15">&nbsp;</td>
                                                        <td height="30">&nbsp;</td>
                                                        <td height="15">&nbsp;</td>
                                                      </tr>
                                                    </table>
                                                </div>
                                                    <div id="listbiennes" style="display:"></div></td>
                                              </tr>
                                            </table>
                                      </div></td>
                                  </tr>
                                  </table>
                              </div>
                                  <div id="listpatrimonio" style="display:none"></div></td>
                            </tr>
                          </table>
                      </div>
                    <div id="mantecontra" style="position:absolute; display:none; width:740px; height:250px; left: 52px; top: 348px; z-index:16; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
                          <table width="734" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="19" height="28">&nbsp;</td>
                              <td width="583" class="Estilo42">Editar Contratante</td>
                              <td width="108">&nbsp;</td>
                              <td width="24"><a onClick="limpiaredit();ocultar_desc('mantecontra')"><img src="iconos/cerrar.png" width="21" height="20" border="0" /></a></td>
                            </tr>
                            <tr>
                              <td height="185">&nbsp;</td>
                              <td colspan="2"><div id="rptaedit" style=" height:180px; overflow:auto;"></div></td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td height="33">&nbsp;</td>
                              <td><div id="msjee"></div></td>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                          </table>
                      </div>
                      <div id="newmrrpp" style="position:absolute; display:none; width:740px; height:272px; left: 50px; top: 385px; z-index:15; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
                          <table width="740" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="23" height="26">&nbsp;</td>
                              <td width="273" class="Estilo15">Ingreso de Movimientos RR. PP</td>
                              <td width="148">&nbsp;</td>
                              <td width="268"><label>
                                <input name="conestado" type="hidden" id="conestado" value="P" size="10" />
                              </label></td>
                              <td width="28"><a href="#" onClick="ocultar_desc('newmrrpp')"><img src="iconos/cerrar.png" width="21" height="20" border="0" /></a></td>
                            </tr>
                            <tr>
                              <td height="19">&nbsp;</td>
                              <td colspan="3" rowspan="8"><table width="678" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td width="101" height="30" class="camposss">Fecha</td>
                                    <td width="170" height="30" class="camposss"><label>
                                      <input name="fechamov" type="text"  class="tcal" size="20" style="background:#FFFFFF" value="<?php echo date("d/m/Y"); ?>" />
                                    </label></td>
                                    <td width="94" height="30" class="camposss">Vencimiento</td>
                                    <td width="313" height="30"><label>
                                      <input name="vencimiento" type="text" id="vencimiento" class="tcal" size="20" style="background:#FFFFFF" />
                                    </label></td>
                                  </tr>
                                  <tr>
                                    <td height="30" class="camposss">Oficina Registral</td>
                                    <td height="30" class="camposss"><select name="idsedereg" id="idsedereg">
                                        <option value="09" selected="selected">IX - Lima</option>
                                        <?php
	       while($rowsede = mysql_fetch_array($sqlsede)){
	         echo "<option value=".$rowsede['idsedereg'].">".$rowsede['dessede']."</option> \n";
             }
	     ?>
                                    </select></td>

                                    <td height="30" class="camposss">Tramite</td>
                                    <td height="30"><select name="idtiptraoges" id="idtiptraoges">
                                        <?php
	       while($rowstra = mysql_fetch_array($sqltra)){
	         echo "<option value=".$rowstra['idtiptraoges'].">".$rowstra['desctiptraoges']."</option> \n";
             }
	     ?>
                                    </select></td>
                                  </tr>
                                  <tr>
                                    <td height="30" class="camposss">Sección Registro</td>
                                    <td height="30" class="camposss"><select name="idsecreg" id="idsecreg">
                                        <?php
	       while($rowsec = mysql_fetch_array($sqlsec)){
	         echo "<option value=".$rowsec['idsecreg'].">".$rowsec['dessecc']."</option> \n";
             }
	     ?>
                                    </select></td>
                                    <td height="30" class="camposss">Importe</td>
                                    <td height="30"><input name="importee" type="text" id="importee" size="15" style="background:#FFFFFF;" /></td>
                                  </tr>
                                  <tr>
                                    <td height="30" class="camposss">Titulo en RR.PP</td>
                                    <td height="30" class="camposss"><label>
                                      <input name="titulorp" type="text" id="titulorp" size="25" style="background:#FFFFFF" />
                                    </label></td>
                                    <td height="30" class="camposss">Observacion</td>
                                    <td height="30" rowspan="2"><label>
                                      <textarea name="observa" style="background:#FFFFFF" id="observa" cols="45" rows="3"></textarea>
                                    </label></td>
                                  </tr>
                                  <tr>
                                    <td height="30" class="camposss">Estado</td>
                                    <td height="30" class="camposss"><select name="idestreg" id="idestreg" onChange="estadorrpp(this.value)">
                                      <?php
	       while($rowestreg = mysql_fetch_array($sqlestra)){
	         echo "<option value=".$rowestreg['idestreg'].">".$rowestreg['desestreg']."</option> \n";
             }
	     ?>
                                    </select>
                                    <input name="codusuario" type="hidden" id="codusuario" value="<?php echo $_SESSION["id_usu"]; ?>" size="15" /></td>
                                    <td height="30" class="camposss">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td height="30" class="camposss">Encargado</td>
                                    <td height="30" class="camposss"><label>
                                      <input type="text" style="background:#FFFFFF" name="encargado" value="<?php echo $rowwuser["prinom"]." ".$rowwuser["segnom"]." ".$rowwuser["apepat"]." ".$rowwuser["apemat"];
	   ?>" id="encargado" />
                                    </label></td>
                                    <td height="30" colspan="2" class="camposss"><div id="ntitulo" style="display:none; width:366px">
                                        <table width="366" border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td width="96">N° de Titulo</td>
                                            <td width="270"><label>
                                              <input type="text" name="numeroo" id="numeroo" />
                                            </label></td>
                                          </tr>
                                        </table>
                                    </div>
                                        <div id="mayor" style="display:none; width:366px;">
                                          <table width="366" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                              <td width="96">Mayor Derecho</td>
                                              <td width="270"><label>
                                                <input type="text" name="mayorderecho" id="mayorderecho" />
                                              </label></td>
                                            </tr>
                                          </table>
                                        </div></td>
                                  </tr>
                                  <tr>
                                    <td height="30" class="camposss">Anotación</td>
                                    <td height="30" colspan="3" class="camposss"><table width="564" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                          <td width="425"><input name="anotacion" type="text" id="anotacion" size="60" style="background:#FFFFFF" /></td>
                                          <td width="139"><a href="#" onClick="validanewmovreg()"><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></td>
                                        </tr>
                                      </table>
                                        <label></label></td>
                                  </tr>
                              </table></td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td height="19">&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                          </table>
                      </div>
                      <div id="formurent" style="position:absolute; display:none; width:740px; height:150px; left: 49px; top: 423px; z-index:14; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
                        <table width="740" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="17" height="31">&nbsp;</td>
                              <td colspan="2" class="Estilo31"><span class="style1">Ingrese Formulario</span></td>
                              <td width="382" class="style2">Formularios</td>
                              <td width="30" class="style2"><a href="#" onClick="ocultar_desc('formurent')"><img src="iconos/cerrar.png" width="21" height="20" border="0" /></a></td>
                            </tr>
                            <tr>
                              <td rowspan="3">&nbsp;</td>
                              <td width="94" height="34" class="Estilo31">N° formulario</td>
                              <td width="217"><label>
                                <input type="text" name="numformu" id="numformu" />
                              </label></td>
                              <td colspan="2" rowspan="3" valign="top"><div id="listform" style="width:400px; height:100px; overflow:auto;"></div></td>
                            </tr>
                            <tr>
                              <td height="34" class="Estilo31">Monto</td>
                              <td><input type="text" name="monto" id="monto" /></td>
                            </tr>
                            <tr>
                              <td class="Estilo31">&nbsp;</td>
                              <td><a href="#" onClick="grabarformulario()" ><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></td>
                            </tr>
                          </table>
                      </div>
                      <div id="preguntas" style="position:absolute; display:none; width:740px; height:150px; left: 48px; top: 322px; z-index:13; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
                          <table width="740" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="19" height="26">&nbsp;</td>
                              <td width="690" class="camposss"><strong>Datos de Renta</strong></td>
                              <td width="31" class="camposss"><a onClick="ocultar_desc('preguntas')"><img src="iconos/cerrar.png" width="21" height="20" /></a></td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td colspan="2"><table width="697" border="0" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td height="24" colspan="3">
                                    <span class="Estilo31">Presentó Comunicación con Cáracter de DECLARACIÓN JURADA indicando:
                                      <label>
                                          <input name="pregu1" type="hidden" id="pregu1" size="5" />
                                          <input name="pregu2" type="hidden" id="pregu2" size="5" />
                                          <input name="pregu3" type="hidden" id="pregu3" size="5" />
                                          </label>
                                          <label>
                                          <input type="hidden" name="idcontratantee" id="idcontratantee" />
                                          </label>
                                    </span></td>
                                  </tr>
                                  <tr>
                                    <td width="378" height="21"><span class="Estilo31">¿La enajenación generó renta de 3ra Categoría?</span></td>
                                    <td width="120"><span class="Estilo31">
                                      <input type="radio" name="radio"  value="1" onClick="formulita(1)" />
                                      Si
                                      <label>
                                        <input type="radio" name="radio" value="0" onClick="formulita(0)" />
                                    </label>
                                      No </span></td>
                                    <td width="199" rowspan="3"><div id="formulinn"> </div></td>
                                  </tr>
                                  <tr>
                                    <td><span class="Estilo31">¿El bien enajenado era la casa habitación del enajenante?</span></td>
                                    <td><span class="Estilo31">
                                      <input type="radio" name="radio2" id="rtm3" value="1" onClick="formulita1(1)" />
                                      Si
                                      <label>
                                        <input type="radio" name="radio2" id="rtm4" value="0"  onclick="formulita1(0)"/>
                                    </label>
                                      No </span></td>
                                  </tr>
                                  <tr>
                                    <td><span class="Estilo31">¿El impuesto por pagar es cero?</span></td>
                                    <td><span class="Estilo31">
                                      <input type="radio" name="radio3" id="rtm5" value="1" onClick="formulita2(1)" />
                                      Si
                                      <label>
                                        <input type="radio" name="radio3" id="rtm6" value="0" onClick="formulita2(0)" />
                                    </label>
                                      No </span></td>
                                  </tr>
                              </table></td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td colspan="2"><table width="697" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td width="79" height="31">&nbsp;</td>
                                    <td width="299">&nbsp;</td>
                                    <td width="87"><a href="#" onClick="grabar_renta()"><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></td>
                                    <td width="232"><div id="rptf"></div></td>
                                  </tr>
                              </table></td>
                            </tr>
                          </table>
                      </div>
                      <div id="uifpdtparticip" class="uifpdtparticip1" style="display:none; z-index:6;">
                          <table width="760" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="23" height="29">&nbsp;</td>
                              <td colspan="4" class="editcampp">UIF - PDT Participa</td>
                              <td width="35"><a  onclick="ocultar_desc('uifpdtparticip')"><img src="iconos/cerrar.png" width="21" height="20" /></a></td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td colspan="5"><table width="728" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
                                  <tr>
                                    <td><table width="691" bgcolor="#999999" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
                                        <tr>
                                          <td width="134"><span class="Estilo15">ACTO</span></td>
                                          <td width="253"><span class="Estilo15">CONTRATANTE</span></td>
                                          <td width="96"><span class="Estilo15">CONDICION</span></td>
                                          <td width="109"><span class="Estilo15">
                                            <label>PORCENTAJE</label>
                                          </span></td>
                                          <td width="33"><span class="Estilo15">UIF</span></td>
                                          <td width="52"><span class="Estilo15">RENTA</span></td>
                                        </tr>
                                    </table></td>
                                  </tr>
                                  <tr>
                                    <td><div id="asigna" class="asigna"> </div></td>
                                  </tr>
                              </table></td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td width="228">&nbsp;</td>
                              <td width="125">&nbsp;</td>
                              <td width="125">&nbsp;</td>
                              <td width="224">&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                          </table>
                      </div>
                      <div id="clienbus" class="clienbus1" style="display:none; z-index:7;">
                          <table width="760" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="18" height="29">&nbsp;</td>
                              <td width="707" class="editcampp">Agregar Contrante</td>
                              <td width="35"><a  onclick="ocultar_desc('clienbus')"><img src="iconos/cerrar.png" width="21" height="20" /></a></td>
                            </tr>
                            <tr>
                              <td colspan="3"><table width="724" border="0" align="center" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td width="38" bgcolor="#FFFFFF">&nbsp;</td>
                                    <td width="192" bgcolor="#FFFFFF"><label>
                                      <select name="tipoper" id="tipoper" >
                                        <option value = "" selected="selected">TIPO DE PERSONA</option>
                                        <option value="N">Natural</option>
                                        <option value="J">Jurídica</option>
                                      </select>
                                    </label></td>
                                    <td width="165" bgcolor="#FFFFFF"><select name="tipdoc" id="tipodoc" >
                                        <option value = "" selected="selected">TIPO DE DOCUMENTO</option>
                                        <?php
		  while($row3=mysql_fetch_array($doc)){
		  echo "<option value = ".$row3["idtipdoc"].">".nl2br($row3["destipdoc"])."</option>";  
		  }
		?>
                                    </select></td>
                                    <td width="202" align="right" bgcolor="#FFFFFF"><input name="numdoc" type="text" id="numdoc" onKeyPress="buscaclientes()" maxlength="11" /></td>
                                    <td width="127" align="center" bgcolor="#FFFFFF"><a  onclick="buscaclientes()"><img src="iconos/buscarclie.png" width="72" height="29" border="0" /></a></td>
                                  </tr>
                                  <tr>
                                    <td height="18" colspan="5" bgcolor="#FFFFFF">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td height="54" colspan="5" bgcolor="#FFFFFF"><div id="busclie" style=" width:720px; height:200px; overflow:auto"> </div></td>
                                  </tr>
                              </table></td>
                            </tr>
                          </table>
                      </div>
                      <div id="clienedit" class="clienedit1" style="display:none; z-index:8;">
                          <table width="760" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="18" height="29">&nbsp;</td>
                              <td width="707" class="editcampp">Mantenimiento Contrantes</td>
                              <td width="35"><a  onclick="ocultar_desc('clienedit')"><img src="iconos/cerrar.png" width="21" height="20" /></a></td>
                            </tr>
                            <tr>
                              <td colspan="3"><table width="724" border="0" align="center" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td width="724" height="18"><label>
                                      <input type="hidden" name="idcontra" id="idcontra" />
                                    </label></td>
                                  </tr>
                                  <tr>
                                    <td height="54"><div id="manclie" style=" width:720px; height:240px; overflow:auto"> </div></td>
                                  </tr>
                              </table></td>
                            </tr>
                          </table>
                      </div>
                      <div id="tabsss" style="display:none; z-index:1;">
                          <table width="755" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="88" class="camposss">Kardex Conexo</td>
                              <td width="116"><input name="kardexconexo" type="text" id="kardexconexo" size="15" /></td>
                              <td width="47" class="camposss">Notaria</td>
                              <td width="215"><label>
                                <select name="idnotario" id="idnotario">
                                  <option value = "" selected="selected">SELECCIONE NOTARIA</option>
                                  <?php
		  while($row2=mysql_fetch_array($not)){
		  echo "<option value = ".$row2["idnotario"].">".nl2br($row2["descon"])."</option>";  
		  }
		?>
                                </select>
                              </label></td>
                              <td width="140"> <a href="#" onClick="mostrarcontratante();mostrarnewreg()"><img src="iconos/refresh.png" width="132" height="38" border="0" /></a></td>
                              <td width="158"><input type="button" name="button" id="button" value="Grabar Cambios" onClick="actkardex()" /></td>
                            </tr>
                            <tr>
                              <td colspan="6">&nbsp;</td>
                            </tr>
                            <tr>
                              <td colspan="6"><ul class="tabs">
                                  <li><a href="#tab1">Contratantes</a></li>
                                <li><a href="#tab3">Facturación</a></li>
                                <li><a href="#tab4">Escrituración</a></li>
                                <li><a href="#tab6">Registros Públicos</a></li>
                              </ul>
                                  <div class="Contenedor1">
                                    <div id="tab1" class="Contenido">
                                      <table width="739" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                          <td width="730" height="15"><table width="700" border="1" bordercolor="#666666" cellspacing="0" cellpadding="0">
                                              <tr>
                                                <td width="245" bgcolor="#264965"><span class="btnpatrimonial">CONTRATANTES</span></td>
                                                <td width="45" align="center" bgcolor="#264965"><span class="btnpatrimonial">FIRMA</span></td>
                                                <td width="87" align="center" bgcolor="#264965"><span class="btnpatrimonial">FECHA FIRMA</span></td>
                                                <td width="168" bgcolor="#264965"><span class="btnpatrimonial">RESPONSABLE</span></td>
                                              </tr>
                                          </table></td>
                                        </tr>
                                        <tr>
                                          <td height="43" ><div id="contratantes" class="contratantes"></div></td>
                                        </tr>
                                        <tr>
                                          <td>&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td><table width="400" border="0" cellspacing="0" cellpadding="0">
                                              <tr>
                                                <td width="149"><a onClick="limpiarbucaclie();mostrar_desc('clienbus');limpiacli()"><img src="iconos/mostrarcontratantes.png" width="134" height="28" border="0" /></a></td>
                                                <td width="251"><a onClick="listarcontrata();mostrar_desc('clienedit')"><img src="iconos/editarcontratante.png" width="134" height="28" border="0" /></a></td>
                                              </tr>
                                          </table></td>
                                        </tr>
                                      </table>
                                    </div>
                                    <div id="tab3" class="Contenido">
                                      <table width="732" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                          <td width="53">&nbsp;</td>
                                          <td width="175">&nbsp;</td>
                                          <td width="175">&nbsp;</td>
                                          <td width="162">&nbsp;</td>
                                          <td width="167">&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td colspan="5"><table width="727" height="209" border="0" cellpadding="0" cellspacing="0">
                                              <tr>
                                                <td colspan="5" rowspan="8" valign="top"><table width="468" height="72" border="1" cellpadding="0" cellspacing="0" bordercolor="#666666">
                                                    <tr>
                                                      <td width="110" height="28" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Documentos</span></td>
                                                      <td width="72" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Fecha</span></td>
                                                      <td width="106" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Condición</span></td>
                                                      <td width="95" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Pv</span></td>
                                                      <td width="80" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Saldo</span></td>
                                                    </tr>
                                                    <tr>
                                                      <td height="21">&nbsp;</td>
                                                      <td>&nbsp;</td>
                                                      <td>&nbsp;</td>
                                                      <td>&nbsp;</td>
                                                      <td>&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                      <td height="21">&nbsp;</td>
                                                      <td>&nbsp;</td>
                                                      <td>&nbsp;</td>
                                                      <td>&nbsp;</td>
                                                      <td>&nbsp;</td>
                                                    </tr>
                                                </table></td>
                                                <td width="91" height="26" align="center" bgcolor="#FFFF99"><span class="Estilo23">TNOT</span></td>
                                                <td width="32" align="center" bgcolor="#FFFF99"><span class="Estilo21">-</span></td>
                                                <td width="90" align="center" bgcolor="#FFFF99"><span class="Estilo23">TREG</span></td>
                                              </tr>
                                              <tr>
                                                <td colspan="3" align="center" bgcolor="#FFFF99"><span class="Estilo21">Presupuesto</span></td>
                                              </tr>
                                              <tr>
                                                <td align="center" bgcolor="#FFFF99"><span class="Estilo21">
                                                  <label>
                                                  <input name="pre1" type="text" id="pre1" size="10" />
                                                  </label>
                                                </span> </td>
                                                <td align="center" bgcolor="#FFFF99"><span class="Estilo21"> -</span></td>
                                                <td align="center" bgcolor="#FFFF99"><span class="Estilo21">
                                                  <label>
                                                  <input name="pre2" type="text" id="pre2" size="10" />
                                                  </label>
                                                </span> </td>
                                              </tr>
                                              <tr>
                                                <td colspan="3" align="center" bgcolor="#FFFF99"><span class="Estilo21">Cobrado</span></td>
                                              </tr>
                                              <tr>
                                                <td align="center" bgcolor="#FFFF99"><span class="Estilo21">
                                                  <label>
                                                  <input name="crobado1" type="text" id="crobado1" size="10" />
                                                  </label>
                                                </span> </td>
                                                <td align="center" bgcolor="#FFFF99"><span class="Estilo21">-</span></td>
                                                <td align="center" bgcolor="#FFFF99"><span class="Estilo21">
                                                  <label>
                                                  <input name="cobrado2" type="text" id="cobrado2" size="10" />
                                                  </label>
                                                </span> </td>
                                              </tr>
                                              <tr>
                                                <td colspan="3" align="center" bgcolor="#FFFF99"><span class="Estilo21">
                                                  <label></label>
                                                  Saldo </span></td>
                                              </tr>
                                              <tr>
                                                <td height="22" align="center" bgcolor="#FFFF99"><span class="Estilo21">
                                                  <label>
                                                  <input name="saldo1" type="text" id="saldo1" size="10" />
                                                  </label>
                                                </span> </td>
                                                <td align="center" bgcolor="#FFFF99"><span class="Estilo21">-</span></td>
                                                <td align="center" bgcolor="#FFFF99"><span class="Estilo21">
                                                  <label>
                                                  <input name="saldo2" type="text" id="saldo2" size="10" />
                                                  </label>
                                                </span> </td>
                                              </tr>
                                              <tr>
                                                <td height="52" align="center" bgcolor="#FFFF99">&nbsp;</td>
                                                <td align="center" bgcolor="#FFFF99">&nbsp;</td>
                                                <td align="center" bgcolor="#FFFF99">&nbsp;</td>
                                              </tr>
                                          </table></td>
                                        </tr>
                                        <tr>
                                          <td>&nbsp;</td>
                                          <td>&nbsp;</td>
                                          <td>&nbsp;</td>
                                          <td>&nbsp;</td>
                                          <td>&nbsp;</td>
                                        </tr>
                                      </table>
                                    </div>
                                    <div id="tab4" class="Contenido">
                                      <table width="730" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                          <td width="123" height="28" class="camposss"># de Minuta</td>
                                          <td width="181" class="camposss"><input name="numminuta" type="text" id="numminuta" maxlength="7" /></td>
                                          <td width="79" align="right" class="camposss"># Escritura</td>
                                          <td width="231" class="camposss"><input name="numescritura" type="text" id="numescritura" maxlength="7" /></td>
                                          <td width="126" class="camposss"><div id="mela"></div></td>
                                        </tr>
                                        <tr>
                                          <td colspan="5" class="camposss"><table width="740" border="0" cellpadding="0" cellspacing="0">
                                              <tr>
                                                <td width="124" height="30">#Folio del</td>
                                                <td width="100"><label></label>
                                                    <input name="folioini" type="text" id="folioini" size="10" maxlength="7" /></td>
                                                <td width="36">al</td>
                                                <td width="246"><label></label>
                                                    <input name="foliofin" type="text" id="foliofin" size="10" maxlength="7" /></td>
                                                <td width="82">&nbsp;</td>
                                                <td width="66"><label></label></td>
                                                <td width="21">&nbsp;</td>
                                                <td width="65">&nbsp;</td>
                                              </tr>
                                          </table></td>
                                        </tr>
                                        <tr>
                                          <td colspan="5" class="camposss"><table width="740" border="0" cellpadding="0" cellspacing="0">
                                              <tr>
                                                <td width="125" height="30">Papel Notarial del</td>
                                                <td width="98"><label></label>
                                                    <input name="papelini" type="text" id="papelini" size="10" /></td>
                                                <td width="38">al</td>
                                                <td width="207"><label></label>
                                                    <input name="papelfin" type="text" id="papelfin" size="10" /></td>
                                                <td width="120">&nbsp;</td>
                                                <td width="66"><label></label>
                                                </td>
                                                <td width="21">&nbsp;</td>
                                                <td width="65">&nbsp;</td>
                                              </tr>
                                          </table></td>
                                        </tr>
                                        <tr>
                                          <td colspan="5" class="camposss"><table width="740" border="0" cellpadding="0" cellspacing="0">
                                              <tr>
                                                <td width="125" height="30">Fecha de Escritura</td>
                                                <td width="150"><label></label>
                                                    <input name="fechaescritura" type="text" id="fechaescritura" class="tcal" size="20" /></td>
                                                <td width="131" align="right">Fecha de Conclusión</td>
                                                <td width="120"><label></label>
                                                    <input name="fechaconclusion" type="text" id="fechaconclusion" class="tcal" size="20" /></td>
                                                <td width="69">&nbsp;</td>
                                                <td width="145"><input type="button" name="btngrabar" id="btngrabar" value="Grabar" onClick="updatekardex()" /></td>
                                              </tr>
                                          </table></td>
                                        </tr>
                                      </table>
                                    </div>
                                    <div id="tab6" class="Contenido">
                                      <table width="732" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                          <td width="53">&nbsp;</td>
                                          <td width="174"><input name="codmovreg" type="hidden" /><input name="itemcodmovreg" type="hidden" />
                                          </td>
                                          <td width="174"><span class="Estilo40"> </span></td>
                                          <td width="109"><span class="Estilo40"> </span></td>
                                          <td width="220">&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td height="236" colspan="5"><table width="727" height="217" border="0" cellpadding="0" cellspacing="0">
                                              <tr>
                                                <td height="63" colspan="5" valign="top"><table width="724" border="0" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                      <td height="198" valign="top"><div id="rp" style="width:730px; height:320px; overflow:auto;">
                                                          <table width="710" height="29" border="1" cellpadding="0" cellspacing="0" bordercolor="#666666">
                                                            <tr>
                                                              <td width="70" height="27" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Fecha Movi.</span></td>
                                                              <td width="153" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Tramite</span></td>
                                                              <td width="73" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Nº Titulo</span></td>
                                                              <td width="125" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Estado</span></td>
                                                              <td width="63" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Importe</span></td>
                                                              <td width="115" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Sede Reg</span></td>
                                                              <td width="95" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Sec. Reg</span></td>
                                                              <td width='16' bgcolor="#CCCCCC">&nbsp;</td>
                                                              <td width='18' bgcolor="#CCCCCC">&nbsp;</td>
                                                            </tr>
                                                          </table>
                                                        <div id="vermovi"></div>
                                                      </div></td>
                                                    </tr>
                                                    <tr>
                                                      <td><table width="338" border="0" cellspacing="0" cellpadding="0">
                                                          <tr>
                                                            <td width="152"><a href="#" onClick="newmove();limpiarrpp()"><img src="iconos/neww.png" width="94" height="29" border="0" /></a></td>
                                                            <td width="72">&nbsp;</td>
                                                            <td width="114">&nbsp;</td>
                                                          </tr>
                                                      </table></td>
                                                    </tr>
                                                </table></td>
                                              </tr>
                                          </table></td>
                                        </tr>
                                      </table>
                                    </div>
                                  </div></td>
                            </tr>
                          </table>
                        <input type="button" name="button3" id="button3" value="UIF/PDT Patrimonial" onClick="mostrar_desc('patrimoniallll')"/>
                          <input type="button" name="button2" id="button2" value="UIF/PDT Participa"  onclick="validar4()"/>
                      </div></td>
                  </tr>
              </table></td>
            </tr>
          </table>
      </form></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td></td>
    </tr>
<tr></tr>
</table>
 </div>
<map name="Map" id="Map">
<area shape="rect" coords="4,3,83,23" href="#" onClick="vernewpatri()" /><area shape="rect" coords="93,2,183,22" href="#" onClick="verlistpatri()" />
</map>
<map name="Map2" id="Map2"><area shape="rect" coords="5,4,93,21" href="#" onClick="agregarbienes()" />
<area shape="rect" coords="103,5,176,22" href="#" onClick="listarbienesss()" />
</map></body>

</html>
